<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="https://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
<head><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
    <title>6.53. Tar-1.15.1</title>
    <link rel="stylesheet" href="../stylesheets/lfs.css" type="text/css" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type="text/css" media="print" />
<script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?d286c55b63a3c54a1e43d10d4c203e75"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script>
</head>
  <body id="lfs" class="6.2">
    <div class="navheader">
      <div class="headertitles">
        <h4>Linux From Scratch - 版本 6.2</h4>
        <h3>第六章 安装系统基础软件</h3>
      </div>
      <ul class="headerlinks">
        <li class="prev">
          <a accesskey="p" href="sysvinit.html" title="Sysvinit-2.86">后退</a>
          <p>Sysvinit-2.86</p>
        </li>
        <li class="next">
          <a accesskey="n" href="texinfo.html" title="Texinfo-4.8">前进</a>
          <p>Texinfo-4.8</p>
        </li>
        <li class="up"><a accesskey="u" href="chapter06.html" title="第六章 安装系统基础软件">上一级</a></li>
        <li class="home"><a accesskey="h" href="../index.html" title="Linux From Scratch - 版本 6.2">首页</a></li>
      </ul>
    </div>
    <div class="wrap">
      <div class="titlepage">
        <h1 class="sect1">6.53. Tar-1.15.1</h1>
      </div>
      <div class="package">
        <p>Tar 包含一个归档程序。</p>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">预计编译时间：</span></strong> <span class="seg">0.2 SBU</span>
            </div>
            <div class="seg">
              <strong><span class="segtitle">所需磁盘空间：</span></strong> <span class="seg">13.7 MB</span>
            </div>
          </div>
        </div>
      </div>
      <div class="installation">
        <div class="titlepage">
          <h2 class="sect2">6.53.1. 安装 Tar</h2>
        </div>
        <p>应用一个patch来解决一些使用GCC-4.0.3时测试单元的问题：</p>
        <pre class="userinput"><kbd class="command">patch -Np1 -i ../tar-1.15.1-gcc4_fix_tests-1.patch</kbd></pre>
        <p>当文件大于 4 GB 并且使用<em class="parameter"><tt>-S</tt></em>选项时，tar 有一个 bug 。下面的补丁修正了这个问题：</p>
        <pre class="userinput"><kbd class="command">patch -Np1 -i ../tar-1.15.1-sparse_fix-1.patch</kbd></pre>
        <p>Tar最近版本都存在一个缓冲区溢出漏洞，应用下面的补丁修正这个问题：</p>
        <pre class="userinput"><kbd class="command">patch -Np1 -i ../tar-1.15.1-security_fixes-1.patch</kbd></pre>
        <p>为编译 Tar 做准备：</p>
        <pre class="userinput"><kbd class="command">./configure --prefix=/usr --bindir=/bin --libexecdir=/usr/sbin</kbd></pre>
        <p>编译软件包：</p>
        <pre class="userinput"><kbd class="command">make</kbd></pre>
        <p>要测试结果，请运行：<strong class="userinput"><tt>make check</tt></strong> 。</p>
        <p>安装软件包：</p>
        <pre class="userinput"><kbd class="command">make install</kbd></pre>
      </div>
      <div class="content">
        <div class="titlepage">
          <a id="contents-tar" name="contents-tar"></a>
          <h2 class="sect2">6.53.2. Tar 的内容</h2>
        </div>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong><span class="segtitle">安装的程序：</span></strong> <span class="seg">rmt, tar</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3><a id="id3695458" name="id3695458"></a>简要描述</h3>
          <table border="0">
            <col align="left" valign="top" />
            <tbody>
              <tr>
                <td><a id="rmt" name="rmt"></a><span class="term"><span><strong class="command">rmt</strong></span></span></td>
                <td><p>通过一个 Internet 连接线程实施远程操作一个磁带驱动器</p></td>
              </tr>
              <tr>
                <td><a id="tar" name="tar"></a><span class="term"><span><strong class="command">tar</strong></span></span></td>
                <td><p>从压缩档案里创建和解压文件，也可理解为压缩包(tarball)。</p></td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="sysvinit.html" title="Sysvinit-2.86">后退</a>
          <p>Sysvinit-2.86</p>
        </li>
        <li class="next">
          <a accesskey="n" href="texinfo.html" title="Texinfo-4.8">前进</a>
          <p>Texinfo-4.8</p>
        </li>
        <li class="up"><a accesskey="u" href="chapter06.html" title="第六章 安装系统基础软件">上一级</a></li>
        <li class="home"><a accesskey="h" href="../index.html" title="Linux From Scratch - 版本 6.2">首页</a>.
        </li>
      </ul>
    </div>
</body></html>
